<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
		<meta charset="utf-8" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>
<body>
<div class="place">
   <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">实习过程管理</a></li>
    <li><a href="#">学生实习管理</a></li>
    </ul>
    </div>
    <div class="rightinfo">
    <div class="tools">
    	<ul class="toolbar">
        </ul>
    <form id="searchForm" class="form-search" action="jobStudent/th_student_page_list.do" method="post">
		<input type="hidden" name="pageNumber" value="1" /> 
			<ul class="seachform1">
		<c:if test="${userRole >2 }">
    	<li><input value="${departmentName }" name="DeptCode" type="hidden">${departmentName }
    	    	</li> 
    	    	</c:if>
    	    	</ul>
		<div class="clearfix"></div>
    	</form>
    </div>
    <table class="tablelist">
    	<thead>
    	<tr>
    	<th>学生姓名</th>
        <th>联系电话</th>
        <th >实习状态</th>
		<th>企业名称</th>
		<th>实习岗位</th>
		<th>企业指导老师</th>
		<th>实习时间</th>
		<th>操作</th>
      </tr>
        </thead>
        <tbody>
           <c:forEach items="${guideStudentList}" var="guideStudent"  varStatus="status">    
             <tr>
       <td>${guideStudent.XM }</td>
		 <td>${guideStudent.LXDH }</td>
		  <td><c:if test="${guideStudent.status==0}">在校</c:if>
			<c:if test="${guideStudent.status==1}">自主创业</c:if>
			<c:if test="${guideStudent.status==2}">专升本</c:if>
			<c:if test="${jobStudent.status==3}">自寻企业实习</c:if>
			<c:if test="${guideStudent.status==4}">学校分配企业</c:if> </td>
		   <td>${guideStudent.enterpriseName}</td>
		    <td>${guideStudent.jobName }</td>
		    <td>${guideStudent.enterTeacherName}</td>
		    <td> ${guideStudent.startTime}至${guideStudent.endTime}</td>
       <td><a onclick="change(${guideStudent.XH});">变更</a>&nbsp;&nbsp;&nbsp;<a href="practicecomment/practice_report.do?studentNumber=${guideStudent.XH }&pdf=0" target="mainFrame" >实习报告</a>&nbsp;&nbsp;&nbsp;<a onclick="evaluateOnclick('${guideStudent.XH}');">&nbsp;&nbsp;&nbsp;评价实习总结</a></td>
      	</tr>  
       </c:forEach>
        </tbody>
    </table>
     <div class="pagin">
    	<%@ include file="page.jsp"%>
    </div>
    </div>
    <script src="js/jquery-1.7.2.js"></script>
     <script src="layer/layer.js"></script>
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	function GoToPage(toPage,totalPage) {
	    if(toPage<=0) return;
	    if(toPage>totalPage) return;
	    $("input[name='pageNumber']").val(toPage);
	    $("#searchForm").submit();
	};
	function closeAll() {
		layer.alert('变更成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
	function close() {
		layer.alert('评价成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
	function change(XH){
		layer.open({
	  type: 2,
	    closeBtn: 2,
	  title: '实习变更',
	  shadeClose: true,
	  shade: 0.8,
	  area: ['600px', '500px'],
	  content:'jobStudent/change.do?XH='+XH, 
	  end: function () {
	      location.reload();
	  }	
	  //iframe的url
	}); 
		
		}
	function evaluateOnclick(XH){
		layer.open({
	  type: 2,
	    closeBtn: 2,
	  title: '实习总结评价',
	  shadeClose: true,
	  shade: 0.8,
	  area: ['850px', '650px'],
	  content:'jobStudent/evaluate.do?XH='+XH, 
	  end: function () {
	      location.reload();
	  }	
	  //iframe的url
	}); 
		
		}
	</script>
</body>
</html>
